<template>
	<!-- ok -->
	<view class="wanlpage-category-title" :style="[pageData.style]" @tap="onMore">
		<!-- <view class="text-lg">
			<text class="margin-right-xs" :class="pageData.data[0].categoryIcon"></text>{{pageData.data[0].categoryName}} ···
		</view> -->
		<view class="hot-box">
			<view class="hot-line"></view>
			<view class="hot-name">热销商品</view>
		</view>
		<view class="text-sm wanl-gray">
			更多<text class="wlIcon-fanhui2 margin-left-xs"></text>
		</view>
	</view>
</template>
<script>
	export default {
		name: "WanlPageCategoryTitle",
		props: {
			pageData: {
				type: Object,
				default: function() {
					return {
						name: '类目标题',
						type: 'categoryTitle',
						params: [],
						style: [],
						data: []
					}
				}
			}
		},
		methods: {
			/**
			 * 更多
			 */
			onMore() {
				this.$wanlshop.to(`/pages/product/list?sort=sales`);
			},
		}
	}
</script>
<style lang="scss">
	.wanlpage-category-title {
		display: flex;
		justify-content: space-between;
		align-items: center;
	}

	.hot-box {
		display: flex;
		align-items: center;

		.hot-line {
			width: 10rpx;
			height: 25rpx;
			border-radius: 2rpx 5rpx 2rpx 2rpx;
			opacity: 1;
			background: linear-gradient(180deg, #84BD00 0%, rgba(87, 144, 248, 0.7) 98%);
		}

		.hot-name {
			font-size: 34rpx;
			font-weight: bold;
			color: #333333;
			margin-left: 16rpx;
		}
	}
</style>